﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using Shop.Data.Business;
using Shop.Data.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Shop.Data.Test.Business
{
[TestClass]
   public  class ClienteBusinessTest
    {
       [TestMethod]
       public void TestGetListByFilter()
       {

           var lista = ClienteBusiness.GetListByFilter("");
           Assert.IsTrue(lista.Count > 0);
       }
       [TestMethod]
       public void TestCreate()
       {
           Cliente Clientes = new Cliente
           {
                codigo = "9988",
                nombre = "rodolfo",
                apellidopaterno= "quispe",
                apellidomaterno= "toque",
                ruc= "98765645432",
                ciudad= "juliaca",
                direccion= "jr. paco yunque",
                celular="951425202",
           };
           Cliente p = ClienteBusiness.Create(Clientes);
           Assert.IsTrue(p.Id != Guid.Empty);
       }
    
       public void TestUpdate()
       {
           Cliente Clientes = new Cliente
           {
               Id = new Guid("26fbf9aa-9ae7-e411-827a-74d02bc102fb"),
               codigo = "74597563",
                nombre= "franklin",
               apellidopaterno= "quispe",
               apellidomaterno= "poma",
               ruc= "56565434567",
               ciudad= "conima",
               direccion= "japisse",
               celular= "954323421",
           };
           Cliente p = ClienteBusiness.Update(Clientes);
           Assert.IsTrue(p.Id != Guid.Empty);
       }
    }
}
